using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using MobileWebsiteGenerator.Entities;

namespace MobileWebsiteGenerator.Mapping
{
	public class CustomerMap : EntityTypeConfiguration<Customer>
	{
		public CustomerMap()
		{
			// Primary Key
			this.HasKey(t => t.Customer_id);

			// Properties
			// Table & Column Mappings
			this.ToTable("Customers");
			this.Property(t => t.Customer_id).HasColumnName("Customer_id");
			this.Property(t => t.UserName).HasColumnName("UserName");
			this.Property(t => t.Password).HasColumnName("Password");
			this.Property(t => t.Email).HasColumnName("Email");
			this.Property(t => t.phone).HasColumnName("phone");
			this.Property(t => t.web_id).HasColumnName("web_id");
		}
	}
}

